package com.logic.modular.game.player.bag.service.handler;

import cn.hutool.extra.spring.SpringUtil;

public enum PropType2 {
    PROP_1(2001L, SpringUtil.getBean(BaseHandler1.class)),
    PROP_4(2004L, SpringUtil.getBean(prop2004.class)),
    PROP_2012(2012L, SpringUtil.getBean(Prop2012.class));


    private final Long propId;
    public final PropType2Handler handler;

    PropType2(Long propId, PropType2Handler handler) {
        this.propId = propId;
        this.handler = handler;
    }

    public static PropType2Handler getHandler(Long propId) {
        for (PropType2 propType2 : PropType2.values()) {
            if (propType2.propId.equals(propId)) {
                return propType2.handler;
            }
        }
        return SpringUtil.getBean(BaseHandler1.class);
    }

}
